package com.cc.spring.request;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

public class UserPwdRequest {
    @NotNull(message = "id不能为空")
    private Long id;
    @NotEmpty(message = "密码不能为空")
    @Pattern(regexp = "^\\w{6,32}$", message = "密码长度必须在【6~32】之间")
    private String password;
    public UserPwdRequest(){}

    public UserPwdRequest(Long id, String password) {
        this.id = id;
        this.password = password;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "UserPwdRequest{" +
                "id=" + id +
                ", password='" + password + '\'' +
                '}';
    }
}
